import math

if __name__ == '__main__':
    out = []
    while True:
        inputstr = input()
        bi,bj,pi,pj = [int(x) for x in inputstr.split(',')]
        if bi<0 or bj<0 or pi<0 or pj<0:
            break
        if pi>bi or pj>pj:
            out.append(math.factorial(bi+bj)//math.factorial(bi)//math.factorial(bj))
        else:
            ai = bi-pi
            aj = bj-pj
            out.append(math.factorial(bi+bj)//math.factorial(bi)//math.factorial(bj)
                       -(math.factorial(pi+pj)//math.factorial(pi)//math.factorial(pj))
                       *(math.factorial(ai+aj)//math.factorial(ai)//math.factorial(aj))
                       )
    for x in out:
        print(x)